<ion-header>
    <ion-toolbar>
        <img class="back_img" src="..\assets\img\返回.png" slot="start" (click)="goBack(courseId)">
        <ion-title>学生列表</ion-title>
        <img class="add_img" src="..\assets\img\添加.png" (click)="addStudent(courseId)" slot="end">
    </ion-toolbar>
</ion-header>

<ion-content>
    <!-- 搜索框 -->
    <ion-toolbar style="margin-top: 1rem;">
        <ion-searchbar placeholder="请输入搜索关键词" [(ngModel)]="keywords">
        </ion-searchbar>
        <ion-buttons slot="end">
            <ion-button (click)="doSearch()" color="dark">
                搜索
            </ion-button>
        </ion-buttons>
    </ion-toolbar>
    <!-- 历史记录 -->
    <!-- <div class="search_content" *ngIf="flag && historyList.length>0" padding>
        <div class="history">
            <h5 class="search_title">历史记录</h5>
            <div class="btn_Delete">
                <ion-icon name="trash" slot="end" color="danger" (click)="deleteHistory(historyList)"></ion-icon>
            </div>
            <p>
                <span *ngFor="let item of historyList;let key=index;" (press)="removeHistory(key)"
                    (tap)="goSearch(item)">
                    {{item}}
                </span>
            </p>
        </div>
    </div> -->
    <!-- 未搜索时显示的结果 -->
    <ion-card >
            <ion-list *ngFor="let item of studentList" key="item.id">
                <ion-item-sliding>
                    <ion-item  (tap)="editStudent(item.id)">
                        <ion-thumbnail slot="start">
                            <img src="../assets/img/index.svg">
                        </ion-thumbnail>
                        <ion-label>{{item.realName}}</ion-label>
                    </ion-item>
                    <ion-item-options side="end">
                        <ion-item-option color="medium" (click)="resetPwd(item.id)">重置密码</ion-item-option>
                        <ion-item-option color="danger" (click)="delete(item.id)">删除</ion-item-option>
                    </ion-item-options>
                </ion-item-sliding>
            </ion-list>
    </ion-card>

</ion-content>